package com.lhc.nacosconsumer.controller;

import com.lhc.nacosconsumer.fegin.ProviderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName ConsumerController
 * @Description:
 * @Author: asus
 * @CreateDate: 2020-11-24 11:07
 * @UpdateUser: asus
 * @UpdateDate: 2020-11-24 11:07
 * @UpdateRemark:
 * @Version: 1.0
 */
@RestController
@RefreshScope
public class ConsumerController {

    @Resource
    private ProviderFeign providerFeign;


    @RequestMapping("hi")
    public String hi() {
        return this.providerFeign.hello();
    }

    @GetMapping("index")
    public String index (){
        return "这是Index；";
    }


}